<template>
  <div class="parking--query">
    <p style="text-align: center;font-size: 18px;">
      泊链comId:<el-input v-model="comId" size="mini" style="width: 200px;"></el-input>
    </p>
    <p style="text-align: center;">
      <el-button size="mini" type="primary" @click="getBolianParkInfo">查询</el-button>
    </p>

    <el-form :model="bolianData" v-if="dataShow" label-position="right" label-width="130px">
      <el-form-item label="车场名称：">{{bolianData.name}}</el-form-item>
      <el-form-item label="com_id：">{{bolianData.com_id}}</el-form-item>
      <el-form-item label="park_union_id：">{{bolianData.park_union_id}}</el-form-item>
      <el-form-item label="电话：">{{bolianData.phone}}</el-form-item>
      <el-form-item label="收费：">{{bolianData.price_desc}}</el-form-item>
      <el-form-item label="备注：">{{bolianData.remark}}</el-form-item>
      <el-form-item label="总车位数：">{{bolianData.total_plot}}</el-form-item>
      <el-form-item label="空车位数：">{{bolianData.empty_plot}}</el-form-item>
      <el-form-item label="错误消息:">{{bolianData.errmsg}}</el-form-item>
      <el-form-item style="width: 100%;" label="车场地址：">{{bolianData.address}}</el-form-item>
    </el-form>
  </div>
</template>

<script>
  export default {
    filters: {
      statusFilter(status) {
        switch (status) {
          case 1: return '进场';
            break;
          case 2: return '出场';
        }
      }
    },
    data() {
      return {
        bolianData: {},
        dataShow: false,
        comId: null
      }
    },
    mounted() {

    },
    methods: {
      getBolianParkInfo() {
        this.$axios({
          method: 'post',
          url: '/park/park-info/getBolianParkInfo',
          data: this.$qs.stringify({comId: this.comId})
        }).then((res) => {
          console.log(res)
          this.bolianData = res.data;
          this.dataShow = true;
        })
      }
    }
  }
</script>

<style scoped>
  .el-form {
    border: 3px solid #ccc;
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
  }

  .el-form-item {
    width: 242px;
    display: inline-block;
  }



</style>
